package main

import (
	BLC "chain/08-proof-of-work/BLC"
	"fmt"
)

func main() {

	//genesisBlock := BLC.CreatBlockchain()
	//genesisBlock.AddBlockToBlockchain("Send 100RMB to wanglaowu")
	//genesisBlock.AddBlockToBlockchain("Send 9900RMB to wanglaowu")
	//genesisBlock.AddBlockToBlockchain("Send 600RMB to wanglaowu")
	//genesisBlock.AddBlockToBlockchain("Send 300RMB to wanglaowu")
	//fmt.Println(genesisBlock)
	//for i := 0; i < len(genesisBlock.Blocks); i++ {
	//	fmt.Println(genesisBlock.Blocks[i])
	//}

	block := BLC.CreateGenesisBlock("Test")
	fmt.Printf("%d\n",block.Nonce)
	fmt.Printf("%x\n",block.Hash)

	proof := BLC.NewProofOfWork(block)
	fmt.Println(proof.IsValid())

}
